$(function(){
	//find();
	video();
});
//进入商城
function seeShopp(){
	//已登录
	window.location.href = "shopp.html"
}
//进入个人中心
function checkPer(){
	if(slf.checkSign()){
		//已登录
		window.location.href = "personal/index.html"
	}else{
		//未登录
		window.location.href = "personal/noLogin.html"
	}
}
//进入课程包
function inCoursePack(){
	window.location.href = "course_pack.html"
}
function video() {
	slf.ajax({
        url: "/find/displayVideo",
        success: function (data) {

            if (data.obj) {
                var dis = data.obj;
                var length = dis.length;
                var html = "";
                for (var i = 0; i < length; i++) {
                	html += "<li class='am-padding-top-sm am-padding-bottom-sm'>";
                    html +=   "<div class='zxhd_imgdiv radius4 over-hide'>";
                    html +=   "<video id='example_video_1' class='video-js vjs-default-skin' controls preload='none'  poster='http://vjs.zencdn.net/v/oceans.png'>";
                    html +=   "<source src='http://vjs.zencdn.net/v/oceans.mp4' type='video/mp4'>";
                    html +=   "</video>";
                    html +=   "</div>";
                    html +=   "<div class='w100b dis-flex am-margin-top-xs'>";
                    html +=   "<div class='w100b flex1 line20' id='videos'>";
                    html +=   "<span class='name am-block'>"+ dis[i].description +"</span>";
                    html +=   "<li>" +dis[i].createDate.substr(0,dis[i].createDate.length-2) + "</li>";
                    html +=   "</div>";
                    html +=   "</div></li>";
                }
                $("#video").append(html);
            }
        }
    });
}
